Skip to content

Conversation

slydiman
Copy link
Contributor

@slydiman slydiman commented May 6, 2025

See #138564 for details.

@slydiman slydiman requested review from zygoloid and Michael137 May 6, 2025 08:51
@slydiman slydiman requested a review from a team as a code owner May 6, 2025 08:51
@llvmbot llvmbot added the libc++abi libc++abi C++ Runtime Library. Not libc++. label May 6, 2025
@llvmbot
Copy link
Member

llvmbot commented May 6, 2025

@llvm/pr-subscribers-libcxxabi

Author: Dmitry Vasilyev (slydiman)

Changes

See #138564 for details.


Full diff: https://github.com/llvm/llvm-project/pull/138656.diff

1 Files Affected:

  • (modified) libcxxabi/src/demangle/Utility.h (+2)
diff --git a/libcxxabi/src/demangle/Utility.h b/libcxxabi/src/demangle/Utility.h
index 511983ad40f7a..8829f3fa13a93 100644
--- a/libcxxabi/src/demangle/Utility.h
+++ b/libcxxabi/src/demangle/Utility.h
@@ -136,6 +136,8 @@ class OutputBuffer {
 
   OutputBuffer &prepend(std::string_view R) {
     size_t Size = R.size();
+    if (!Size)
+      return *this;
 
     grow(Size);
     std::memmove(Buffer + Size, Buffer, CurrentPosition);

@Michael137 Michael137 changed the title Fixed libcxxabi Demangle [ItaniumDemangle] Fix libcxxabi OutputBuffer::prepend for empty inputs May 6, 2025
@slydiman slydiman merged commit 0dce0ea into llvm:main May 6, 2025
18 of 25 checks passed
GeorgeARM pushed a commit to GeorgeARM/llvm-project that referenced this pull request May 7, 2025
@slydiman slydiman deleted the fix-libcxxabi-demangle branch June 23, 2025 09:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
libc++abi libc++abi C++ Runtime Library. Not libc++.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants